/*
package com.gpframework.module.controller.module;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.TypeReference;
import com.gpframework.common.constant.Constants;
import com.gpframework.common.core.redis.RedisCache;
import com.gpframework.common.exception.ParamException;
import com.gpframework.common.utils.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gpframework.common.annotation.Log;
import com.gpframework.common.core.controller.BaseController;
import com.gpframework.common.core.domain.AjaxResult;
import com.gpframework.common.enums.BusinessType;
import com.gpframework.module.module.domain.GpSupplier;
import com.gpframework.module.module.domain.vo.GpSupplierVo;
import com.gpframework.module.module.domain.req.GpSupplierReq;
import com.gpframework.module.module.domain.req.GpSupplierAdd;
import com.gpframework.module.module.domain.req.GpSupplierUpdate;
import com.gpframework.module.module.service.IGpSupplierService;
import com.gpframework.common.utils.poi.ExcelUtil;
import javax.validation.Valid;
import io.swagger.annotations.*;
import com.gpframework.common.core.page.TableDataInfo;
*/
/**
 * @ClassName GpSupplierController
 * @Author gpframework
 * @Date 2023-12-05
 * @Version 1.0.0
 * @Description 服务商Controller 接口类
 *//*

@Validated
@Api(tags = "服务商")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/module/supplier" )
public class GpSupplier2Controller extends BaseController {

    private final IGpSupplierService iGpSupplierService;
    private final RedisCache redisCache;
 */
/**
  * @Description 分页
  * @Author gpframework
  * @Date 2023-12-05
  * @Param gpSupplier
  * @Return TableDataInfo
 *//*

    @ApiOperation("列表")
    @GetMapping("/list")
    public TableDataInfo<GpSupplierVo> list(GpSupplierReq gpSupplierReq)
    {
        //获取缓存
        String key = Constants.SUPPLIER + gpSupplierReq.getBrandId() + gpSupplierReq.getStoreId();
        Object cacheObject = redisCache.getCacheObject(key);
        TableDataInfo dataTable;
        if (cacheObject == null) {
            startPage();
            QueryWrapper<GpSupplier> lqw = new QueryWrapper<GpSupplier>();
            gpSupplierReq.generatorQuery(lqw, true);
            List<GpSupplierVo> list = iGpSupplierService.listVo(lqw);
            dataTable = getDataTable(list);
            redisCache.setCacheObject(key,JSON.toJSONString(dataTable),2, TimeUnit.HOURS);
        } else {
            dataTable = JSON.parseObject(cacheObject.toString(),TableDataInfo.class);
        }
        return dataTable;
    }


    */
/**
     * @Description 分页
     * @Author gpframework
     * @Date 2023-12-05
     * @Param gpSupplier
     * @Return TableDataInfo
     *//*

    @ApiOperation("列表")
    @GetMapping("/listAll")
    public AjaxResult<GpSupplierVo> listAll(GpSupplierReq gpSupplierReq)
    {
        QueryWrapper<GpSupplier> lqw = new QueryWrapper<GpSupplier>();
        gpSupplierReq.generatorQuery(lqw,true);
        List<GpSupplierVo> list = iGpSupplierService.listVo(lqw);
        return AjaxResult.success(list);
    }

    */
/**
     * @Description 详情
     * @Author gpframework
     * @Date 2023-12-05
     * @Param gpSupplier
     * @Return AjaxResult
     *//*

    @ApiOperation("详情")
    @GetMapping(value = "/{id}" )
    public AjaxResult<GpSupplierVo> getInfo(@PathVariable("id" ) Long id) {
        return AjaxResult.success(iGpSupplierService.getVoById(id));
    }

    */
/**
     * @Description 新增
     * @Author gpframework
     * @Date 2023-12-05
     * @Param gpSupplier
     * @Return AjaxResult
     *//*

    @ApiOperation("新增")
    @PostMapping
    public AjaxResult add(@Valid @RequestBody GpSupplierAdd gpSupplierAdd) {
        GpSupplier gpSupplier = Convert.convert(new TypeReference<GpSupplier>() {}, gpSupplierAdd);
        return toAjax(iGpSupplierService.save(gpSupplier) ? 1 : 0);
    }

    */
/**
     * @Description 修改
     * @Author gpframework
     * @Date 2023-12-05
     * @Param gpSupplier
     * @Return AjaxResult
     *//*

    @ApiOperation("修改")
    @PutMapping
    public AjaxResult edit(@Valid @RequestBody GpSupplierUpdate gpSupplierUpdate) {
        GpSupplier gpSupplier = Convert.convert(new TypeReference<GpSupplier>() {}, gpSupplierUpdate);
        return toAjax(iGpSupplierService.updateById(gpSupplier) ? 1 : 0);
    }

    */
/**
     * @Description 删除
     * @Author gpframework
     * @Date 2023-12-05
     * @Param gpSupplier
     * @Return AjaxResult
     *//*

    @ApiOperation("删除")
    @DeleteMapping("/{ids}" )
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(iGpSupplierService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
    }
}
*/
